package com.dmp.onlinestore.view.base;

public class ViewDefs {

	// Basic root directories.
	public static String VIEW_ROOT_DIR         = "/WEB-INF/views";
	public static String VIEW_SUBDIR_NO_FRILLS = "/no_frills";
	public static String VIEW_SUBDIR_SPIFFY    = "/spiffy";
	
	
	// String constants for the names of different views.
	public static String VIEW_HEADER         = "/StandardHeader.jsp";
	public static String VIEW_WELCOME        = "/Welcome.jsp";
	public static String VIEW_CATALOG        = "/Catalog.jsp";
	public static String VIEW_GENERAL_ERROR  = "/GeneralError.jsp";
	public static String VIEW_PAGE_NOT_FOUND = "/PageNotFound.jsp";
	
	
	// String constants for scope attributes (request, session, servlet context).
	public static String ATTR_PRODUCT_LIST = "prodList";
	public static String ATTR_INDEX_LIST   = "indicesList";	
	public static String ATTR_CURR_RANGE   = "currentRange";	

	// Update this whenever the context root declared in the deployment
	// descriptor is updated. The structure of this application is such
	// that any link ("get" or "post") which is built must use this
	// utility to either build the link, or to get the context root
	// which should be used.
	public static String servletMapping = "/Controller";
	
	// Possible incoming actions.
	public static String REQUEST_FIELD_ACTION   = "action";
	public static String ACTION_GET_PRODUCTS    = "getProducts";
	//public static String ACTION_CREATE_ACCOUNT  = "createAccount";

	public static String getServletMapping() {
		return servletMapping;
	}
	
	
}
